class HistoryController < ApplicationController
  active_scaffold :history do |config|
     config.actions = [:list]
     config.label = "Position History"
     config.list.columns =[:hposition_name,:hmember,:hteam_name,:seniority,:hassignation_date,:hfinish_date]
      config.columns[:hassignation_date].label = "Assignation Date"
      config.columns[:hfinish_date].label = "Assignation Finish Date"
      config.columns[:hmember].label = "Member"
      config.columns[:hposition_name].label = "Position"
      config.columns[:hteam_name].label = "Team"
	config.list.label = "Position History"
        config.list.sorting = { :id => :asc, :hassignation_date => :desc }
  end
  def conditions_for_collection
            if params[:id]
              #For Open Positions embedded scaffold
              #['in_use = ?', "Free"]
              ['id in (?) ',params[:id]]                
            end
  end
end
